﻿using UnityEngine;

namespace OestsCommon.Player
{
    /// <summary>
    /// 角色同步数据
    /// </summary>
    public class RoleSyncData
    {

        /// <summary>
        /// 角色ID
        /// </summary>
        public int RoleId;

        /// <summary>
        /// 角色目标点或者强制同步的具体位置
        /// </summary>
        public Point3 Point;

        /// <summary>
        /// 旋转
        /// </summary>
        public Rotation4 Rotation;

        /// <summary>
        /// 场景名称，只有相同的场景才需要更新
        /// </summary>
        public string SceneName;


        public RoleSyncData()
        {
        }

        public RoleSyncData(int roleId, Vector3 vector3)
        {
            RoleId = roleId;
            Point = new Point3(vector3);
            SceneName = "";
        }

        public RoleSyncData(int roleId, Vector3 vector3, string scene)
        {
            RoleId = roleId;
            Point = new Point3(vector3);
            SceneName = scene;
        }

        public RoleSyncData(int roleId, Vector3 vector3, Rotation4 rotation)
        {
            RoleId = roleId;
            Point = new Point3(vector3);
            Rotation = rotation;
            SceneName = "";
        }

        public RoleSyncData(int roleId, Vector3 vector3, Rotation4 rotation, string scene)
        {
            RoleId = roleId;
            Point = new Point3(vector3);
            Rotation = rotation;
            SceneName = scene;
        }
    }
}
